<?php

require_once("Collection.php");
require_once("../tags/tags.php");

$coll = new Collection();

$tags = json_decode($_POST["tags"]);
$content = json_decode($_POST["content"]);
$name = $_POST["name"];
$description = $_POST["description"];
$tagObj = new Tags();
$tagIds = $tagObj->getTagIds($tags);

$coll->addCollection($name,$description,$tagIds,$content);

?>